/*
 * IfInstruction.h
 *
 *  Created on: 28/dic/2010
 *      Author: computer
 */

#ifndef BLOCKINSTRUCTION_H_
#define BLOCKINSTRUCTION_H_
#include "Expression.h"
#include "FlowExpression.h"

namespace TreeExpression {

class BlockInstruction : public FlowExpression, public Expression_CRTP<BlockInstruction> {
public:
	BlockInstruction();
	BlockInstruction(const BlockInstruction&);
	~BlockInstruction();

	void addInstruction(const AutoPointer<Expression>&);

	Expression* clone() const;

	virtual AutoPointer<Expression> eval(CopyPointer<Context>&);
	virtual std::string toString() const;

	virtual bool isStop() const;
private:
	bool stop;
	std::list< AutoPointer<Expression> > listInstruction;
};

}


#endif /* IFINSTRUCTION_H_ */
